﻿

namespace Huirui.Cavan.Presentation.ViewModel.SystemModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Huirui.Cavan.Presentation.Seedwork;
    using Huirui.Cavan.Domain.MainBoundedContext.SystemModule;
    using Huirui.Cavan.Domain.MainBoundedContext.SearchModule;
    using FluentValidation;
    using FluentValidation.Attributes;

    [Serializable]
    //[Validator(typeof(UserAccountViewModelValidator))]
    public class UserAccountViewModel : EntityModel<UserAccount, UserAccountSearch>, IUserAccountViewModel
    {
        public string LoginUserName { get; set; }
        public bool AutoLogin { get; set; }
        public string IsLocked { get; set; }
    }

    public class UserAccountJson
    {
        public bool IsSelected { get; set; }
        public int Id { get; set; }
        public string Name { get; set; }
        public string Password { get; set; }
        public string Employee { get; set; }
        public string Status { get; set; }
        public string IsLocked { get; set; }
    }

    public class UserAccountJsonViewModel : JsonViewModel<UserAccountJson>
    {
    }
    //public class UserAccountViewModelValidator : AbstractValidator<UserAccountViewModel>
    //{
    //    public UserAccountViewModelValidator()
    //    {
    //        RuleFor(ua => ua.LoginUserName).NotEmpty().WithMessage(Messages.Validate_LoginUserNameIsInvalid).Length(2, 20).WithMessage(Messages.Validate_LoginUserNameIsInvalid);
    //    }
    //}
}
